package m.jclecai.com.bean;

import m.jclecai.com.R;
import m.jclecai.com.pay.IPay;

/**
 * Created by andy on 2017/8/19.
 */

public class PayChannelBean {

    public int mIcon;
    public boolean mIsChecked;

    //内容
    public String content;
    public String logo;
    public String channel;
    public int isclose;
    public String name;
    public String systemID;
    public String title;
    private float amount;
    private String projectno;

    //是否可用；
    public boolean isClose;

    //具体的支付方式；
    public IPay mIPay;
    /**
     * id : 1
     * key : qifenqian
     * isclose : 0
     * clientID : 3
     */

    private String id;
    private String key;
    private String clientID;

    private String ipaddr;

    public IPay getIPay() {
        return mIPay;
    }

    public void setIPay(IPay IPay) {
        mIPay = IPay;
    }

    public int getIcon() {
        return mIcon;
    }

    public void setIcon(int icon) {
        mIcon = icon;
    }

    public boolean isChecked() {
        return mIsChecked;
    }

    public void setChecked(boolean checked) {
        mIsChecked = checked;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
        if (logo.equals("alipay")) {
            //支付宝支付
            setIcon(R.drawable.alipay);
        } else if (logo.equals("qqpay")) {
            //qq钱包支付
            setIcon(R.drawable.qq_pay);
        } else if (logo.equals("weixin")) {
            //微信支付
            setIcon(R.drawable.wxicon_1);
        } else if (logo.equals("iapppay")) {
            setIcon(R.drawable.aibei_icon);
        }  else if (logo.equals("sumpay")) {
            setIcon(R.drawable.sumpay_ico);
        }else {
            setIcon(R.drawable.alipay);
        }
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public int getIsclose() {
        return isclose;
    }

    public void setIsclose(int isclose) {
        if (isclose == 1) {
            this.isClose = true;
        } else {
            this.isClose = false;
        }
        this.isclose = isclose;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSystemID() {
        return systemID;
    }

    public void setSystemID(String systemID) {
        this.systemID = systemID;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public boolean isClose() {
        return isClose;
    }

    public void setClose(boolean close) {
        isClose = close;
    }

    public float getAmount() {
        return amount;
    }

    public void setAmount(float amount) {
        this.amount = amount;
    }

    public String getProjectno() {
        return projectno;
    }

    public void setProjectno(String projectno) {
        this.projectno = projectno;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getClientID() {
        return clientID;
    }

    public void setClientID(String clientID) {
        this.clientID = clientID;
    }

    public String getIpaddr() {
        return ipaddr;
    }

    public void setIpaddr(String ipaddr) {
        this.ipaddr = ipaddr;
    }
}
